//
//  KDWeekCell.h
//  KDCalendarControl
//
//  Created by Keith Duncan on 07/07/2007.
//  Copyright 2007 thirty-three. All rights reserved.
//

#import <Cocoa/Cocoa.h>

enum {
	KDLowerCase,
	KDUpperCase,
	KDCapitalized
};
typedef NSUInteger StringType;

NS_INLINE NSRect DayRectForRowRect(NSRect rowRect, NSUInteger column) {
	NSRect dayRect = rowRect;
	dayRect.size.width = NSWidth(rowRect)/7.0;
	dayRect.origin.x = NSMinX(rowRect) + (NSWidth(dayRect) * column);
	return dayRect;
}

// The array is zero based, i.e. SUNDAY = 0
extern NSRectArray CreateDayRectsForBounds(NSRect bounds);

@interface KDWeekCell : NSCell {
	NSArray *_dayNames;
	
	NSUInteger _stringType, _titleLength;
	
	NSIndexSet *_selectedDays;

	NSColor *_selectedColor, *_regularColor;
}

- (void)setStringType:(StringType)type;
- (void)setTitleLength:(NSUInteger)value;

@property(retain) NSIndexSet *selectedDays;

@property(retain) NSColor *selectedColor, *regularColor;

@end
